package oop7;

import oop6.pet2.Dog;
import oop6.pet2.Pet;

/**
 * @author oldliu
 * @since 1.0
 */
public class PetTest {
    public static void main(String[] args) {
        Dog d=new Dog("大黄",3,"公",100,100,"田园犬");
        d.print();
        System.out.println(">>>"+d);//toString
        String str="This is a dog "+d;//d.toString()
        System.out.println(str);
       //方法 System.out.println("类别是："+d.getStrain());
        System.out.println(">>>>>>>>>>>>>>>>>>>>");
        Pet p=new Dog("翠花",2,"母",100,99,"泰迪");
        p.print();//子类dog的print方法

    }
}
